out vec4 FragColor;

in vec2 fragUv;
uniform sampler2D colorMap;

uniform sampler2D depthMap;

uniform bool blitDepth = false;

void main()
{             

    //todo: 这样会导致程序额外的运算量，
    //理想情况是用宏隔离，后续得封装一下shader
    if(blitDepth){
        gl_FragDepth = texture(depthMap, fragUv).r;
    }

    vec4 fragColor = texture(colorMap, fragUv);
    FragColor = fragColor;
}